﻿using System;
class program
{
    static void Main()
    {
        Console.WriteLine("请输入第一个数：");
        string num1 = Console.ReadLine();
        Double mynum1 = Double.Parse(num1);
        Console.WriteLine("请输入第二个数：");
        string num2 = Console.ReadLine();
        Double mynum2 = Double.Parse(num2);
        Console.WriteLine("请输入符号：");
        string s1 = Console.ReadLine();
        double result = getresult(s1, mynum1, mynum2);
        Console.Write("结果为：");
        if (s1 == "/" && mynum2 == 0)
            Console.Write("wrong");
        else
            Console.Write(result);
    }
    static double getresult(string s1, double mynum1, double mynum2)
    {

        double res = 0;
        switch (s1)
        {
            case "+":
                res = mynum1 + mynum2;
                break;
            case "-":
                res = mynum1 - mynum2;
                break;
            case "*":
                res = mynum1 * mynum2;
                break;
            case "/":
                res = mynum1 / mynum2;
                break;
            case "%":
                res = mynum1 % mynum2;
                break;

        }
        return res;

    }
}